Real-Time Network Functions

This section summarizes the Real Time Network (RTN) function set. RTN functions are those functions provided by the RT-TCP/IP Protocol Stack and are available for use by an RT-TCP/IP NIC driver, an RT-TCP/IP filter, or an application. The RTN functions are exported by the stack and may be used by doing the following:

NOTE: Linking the driver to the appropriate files satisfies the linking requirements for both drivers and filters. There is no need to explicitly link the filter.

NOTE: These functions require the RT-TCP/IP Stack to run. When an application process calls one of these functions, we recommend using RtnIsStackOnline to ensure that the Stack is running. If these functions are called while the Stack is not started, an exception may occur.

NOTE: Real-Time Network functions cannot be called from a Windows executable file (.exe).

For detailed information about a function, click its link in the table below.

Real-Time Network Function Description

RtnAddMultiRoute

First validates if it has received a proper multicast IPv4 address. Then it adds multicast IPv4 address to the routing table on the selected device. After allocating a new entry in the IGMP table, it then sends the IGMP report of the new entry.

RtnAttachProcessExitHandler Registers an application's networking exit handler to allow an RTSS application to perform custom socket code cleanup when an application

RtnDecodePacket

Accesses various fields in the stack defined packet structure.

RtnDeleteCriticalLock

Frees any associated memory from a CriticalLock.

RtnDeleteMultiRoute

First validates if it has received a proper multicast IPv4 address. It then deletes the multicast IPv4 address from the routing table on the selected device.

RtnDisplayNbrCacheTable

Displays the neighbor cache entry, the neighboring node's IPv6 address, the corresponding link-layer address, and the state of the neighbor cache entry for the network device identifier.

RtnDisplayRoutingTable

Displays all static IPv4 and IPv6 routes from RT-TCP/IP stack’s forwarding database.

RtnEnterCriticalLock

Waits on the associated CriticalLock until no other thread is inside a RtnEnterCritcalLock RtnLeaveCriticalLock pairing.

RtnEnumPciCards

Calls the fnCheckPciCard function for every PCI card found within the system (or until fnCheckPciCard returns TRUE), and is used to locate a PCI NIC.

RtnGetDataLong

Retrieves the value placed at offset index of the network device pointed to by ndp.

RtnGetDeviceFromIpAddress

Converts a binary IP address in network byte order into the network device pointer for the particular device.

RtnGetDeviceName

Returns a pointer to the ASCII character name associated with this driver instance.

RtnGetDevicePtr

Gets the network device pointer associated with ASCII network device name.

RtnGetIpAddress

Returns the IP address associated with this device instance.

RtnGetMcastCount

Normally used in RtndIoctl to determine the multicast address count.

RtnGetMsPerTick

Returns the tick interval, in milliseconds per tick, that the stack timer is configured to use.

RtnGetPacket

Returns a pointer to an RT-TCP/IP Stack packet structure.

RtnIndicateStatus

Reports the status for an instance of the driver for the RTX64-converted NIC card.

RtnInitializeCriticalLock

Initializes a CriticalLock data structure.

RtnInstallStaticRoute

Installs a static IPv4 or IPv6 route in RT-TCP/IP stack’s forwarding database.

RtnIsDeviceOnline Used to get the online status of a network device for link status monitoring.
RtnIsStackOnline Used to get the online status of the RT-TCP/IP stack for link status monitoring.

RtnIOCTLDriver

Called when the filter requires that the driver configure certain NIC modes or characteristics.  

RtnLeaveCriticalLock

Exits a CriticalLock section.

RtnNotifyRecv

Used to notify the stack that data has been received.

RtnReleaseProcessExitHandler

Removes an application's networking exit handler registered by the function RtnAttachProcessExitHandler.

RtnRemoveStaticRoute

Removes a static IPv4 or IPv6 route from RtTcpIP stack’s forwarding database.

RtnRequest

Forwards a request to the underlying driver to query the requested capabilities and/or statistics of the RTX64 converted NIC card.

RtnSetDataLong

Sets the value at offset index of the network device pointed to by ndp.

RtnSetDefaultGateway

Sets the gateway address (in the stack) for an instance of the driver.

RtnSetLinkAddress

Sets the hardware address (in the stack) for an instance of the driver.

RtnTransmitDone

Notifies the RT-TCP/IP Stack that the most recent packet handed to RtndTransmit should be returned to the stack buffer pool for reuse.